package 面向对象中级.房屋出租系统;

    public class House {
        private  String name;         // 姓名
        private  String phoneNumber;  // 电话号码
        private  String address;      // 地址
        private  double money;        // 月租
        private  boolean state;       // 状态

        public House() {
        }

        public House(String name, String phoneNumber, String address, double money, boolean state) {
            this.name = name;
            this.phoneNumber = phoneNumber;
            this.address = address;
            this.money = money;
            this.state = state;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPhoneNumber() {
            return phoneNumber;
        }

        public void setPhoneNumber(String phoneNumber) {
            this.phoneNumber = phoneNumber;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public double getMoney() {
            return money;
        }

        public void setMoney(double money) {
            this.money = money;
        }

        public String isState() {
            return state ? "已出租" : "未出租" ;
        }

        public void setState(boolean state) {
            this.state = state;
        }

        @Override
        public String toString() {
            return name+ "\t\t" + phoneNumber + "\t\t" + address + "\t\t" + money + "\t\t" + isState();
        }
    }
